package itheima.zuoye.test6;

public class Test {
    public static void main(String[] args) {
        Employee.feed(new Animal("小狗", 1) {
            @Override
            public void feed() {
                System.out.println("喂食狗粮");
            }
        });
        Employee.feed(new Animal("小猫", 2) {
            @Override
            public void feed() {
                System.out.println("喂食猫粮");
            }
        });
        Employee.feed(new Animal("小兔子", 3) {
            @Override
            public void feed() {
                System.out.println("喂食兔子食物");
            }
        });


        //==============================================

        Animal dog = new Animal() {
            @Override
            public void feed() {

            }
        };

        Employee.feed(dog);

    }
}

